package com.ctms.system.dao;

import com.ctms.system.domain.CourseScoreDO;
import com.ctms.system.domain.UserDO;
import com.ctms.system.domain.UserRoleDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TeacherMapper {
    //查询所有教师信息
    List<UserDO> selectAllTeacher(Map<String,Object> params);
    int count(Map<String, Object> params);
    //增加教师
    int insertTeacher(UserDO userDO);
    //用户角色表
    int insertUserRole(UserRoleDO userRoleDO);

    //删除教师
    int deleteTeacher(Integer id);
    //删除用户角色表
    int deleteUserRole(Integer userId);

    //通过id查询所有信息
    UserDO selectById(Integer id);
    int updateTeacher(UserDO userDO);

    int updateCollege(UserDO userDO);
    int updateCompany(UserDO userDO);

    //查询教师的学生
    List<UserDO> selectTeacherStu(Map<String,Object> param);
    int countTeacherStu(Map<String,Object> param);
    //导出时查询所有这位老师的学生
    List<UserDO> exportMyStu(Integer loginId);
    //按班级
    List<UserDO> exportMyStuByClass(@Param("loginId")Integer loginId, @Param("condition")String condition);
    //按课程
    List<UserDO> exportMyStuByCourse(@Param("loginId")Integer loginId,@Param("condition")String condition);
    //通过courseId、userId查询成绩
    CourseScoreDO selectScoreByCidUserId(@Param("courseId")Integer courseId, @Param("userId")Integer userId);
}
